package reduce.fz.com.reduce.bean.page;

/**
 * Created by qingshengzheng on 15/7/5.
 */
public class Pagination {
    //分页类型-pageNo
    public static int TYPE_PAGE_NO=0;
    //分页类型-startnum
    public static int TYPE_START_NUM=1;

    //分页类型
    public Integer pageType;

    public Integer pageNo = 1;
    private Integer pageSize = 15;
    private Boolean isLoading = false;
    private Long  startNum=-1L;


    public Long getStartNum() {
        return startNum;
    }

    public void setStartNum(Long startNum) {
        this.startNum = startNum;
    }

    public Boolean isEnd() {
        return end;
    }

    public void setEnd(Boolean end) {
        this.end = end;
    }

    private Boolean end;

    public Integer getPageNo() {
        return pageNo;
    }

    public Pagination nextPage() {
        this.pageNo++;
        return this;
    }

    public void reset()
    {
        pageNo=1;
        isLoading=false;
    }


    public Boolean isFristPage() {
        return pageNo == 1;
    }


    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Boolean getIsLoading() {
        return isLoading;
    }

    public void setIsLoading(Boolean isLoading) {
        this.isLoading = isLoading;
    }


}
